package com.example.mydesignmodule.proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author tgw
 * @date 2021/3/11
 * @describe  动态代理
 */
class DynamicPro implements InvocationHandler {

    private Object object;

    public DynamicPro(Object object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object result = method.invoke(object,args);
        return result;
    }
}
